//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "server\fn_serverExecuteLead.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_object","_action","_caller","_act_id","_arguments","_action_id"];
DEFAULT_PARAM(_object,TMF_EXECUTE_ACTION_OBJECT,objNull);
DEFAULT_PARAM(_caller,TMF_EXECUTE_ACTION_CALLER,objNull);
DEFAULT_PARAM(_act_id,TMF_EXECUTE_ACTION_ID,-1);
DEFAULT_PARAM(_arguments,TMF_EXECUTE_ACTION_ARGS,[]);
DEFAULT_PARAM(_action,TMF_EXECUTE_ACTION_ACTION,[]);

_action_id = _arguments select TMF_EXECUTE_ACTION_PARAM_ACTID;

if (!isnull _object) then {
	_object setCaptive false;
	_object enableAI "MOVE";	
};

TRACE("End");
TMFPROFILERSTOP;